<h:form id="formfonteDeRecursoDespesa"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:pe="http://primefaces.org/ui/extensions"
        xmlns:f="http://java.sun.com/jsf/core">

    <script language="JavaScript" src = "scripts/script.js"/>

    <h:panelGrid style="width: 100%">

        <h:panelGrid columns="2" style="width: 100%">
            <h:panelGroup>
                <h:outputLabel value="Fonte de Recurso" /><br/>
                <p:selectOneMenu value="#{fonteDeRecursoDespesaBean.fonteDeRecursoDespesa.fonteDeRecurso}"
                                 style="width: 400px">
                    <f:selectItem itemLabel="Selecione" />
                    <f:selectItems value="#{fonteDeRecursoDespesaBean.fontesDeRecurso}" />
                    <f:converter converterId="simpleEntityConverter" />
                </p:selectOneMenu>
            </h:panelGroup>
            <h:panelGroup>
                <h:outputLabel value="Valor Fonte De Recurso"/><br/>
                <pe:inputNumber id="valorDespesa" value="#{fonteDeRecursoDespesaBean.fonteDeRecursoDespesa.valorFonteRecurso}"
                                required="true" requiredMessage="Campo Obrigatório"
                                symbol="R$" decimalSeparator="," thousandSeparator="."/>
            </h:panelGroup>
        </h:panelGrid>
    </h:panelGrid>

    <hr/>

    <p:commandButton id="btnGravar" value="Gravar"
                     actionListener="#{fonteDeRecursoDespesaBean.adicionarEditarFim}"
                     update="formfonteDeRecursoDespesa" />

    <p:commandButton value="Cancelar"
                     actionListener="#{fonteDeRecursoDespesaBean.cancelar}"
                     immediate="true"/>

</h:form>


